<HTML>
<HEAD>
<!-- Created by texi2html 1.56k from /home/jaffer/scheme/r5rs.txi on 28 March 2001 -->

<TITLE>Revised(5) Scheme - 4. Expressions</TITLE>
</HEAD>
<BODY>
Go to the <A HREF="r5rs_1.html">first</A>, <A HREF="r5rs_5.html">previous</A>, <A HREF="r5rs_7.html">next</A>, <A HREF="r5rs_14.html">last</A> section, <A HREF="r5rs_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC24" HREF="r5rs_toc.html#TOC24">4. Expressions</A></H1>

<P>
<A NAME="IDX80"></A>


<P>
Expression types are categorized as <EM>primitive</EM> or <EM>derived</EM>.
Primitive expression types include variables and procedure calls.
Derived expression types are not semantically primitive, but can instead
be defined as macros.
With the exception of <SAMP>`quasiquote'</SAMP>, whose macro definition is complex,
the derived expressions are classified as library features.
Suitable definitions are given in section <A HREF="r5rs_9.html#SEC80">7.3 Derived expression types</A>.




<H2><A NAME="SEC25" HREF="r5rs_toc.html#TOC25">4.1 Primitive expression types</A></H2>

<P>
<A NAME="IDX81"></A>




<H3><A NAME="SEC26" HREF="r5rs_toc.html#TOC26">4.1.1 Variable references</A></H3>

<P>
<A NAME="IDX82"></A>


<P>
<A NAME="IDX83"></A>
<DL>
<DT><U>syntax:</U> <B>&#60;variable&#62;</B>
<DD>


<P>
An expression consisting of a variable
<A NAME="IDX84"></A>
(section see section <A HREF="r5rs_5.html#SEC19">3.1 Variables; syntactic keywords; and regions</A>) is a variable reference.  The value of
the variable reference is the value stored in the location to which the
variable is bound.  It is an error to reference an
unbound variable.
<A NAME="IDX85"></A>



<PRE>
<TT>(define x 28)
x                                      ==&#62;  28
</TT>
</PRE>

</DL>



<H3><A NAME="SEC27" HREF="r5rs_toc.html#TOC27">4.1.2 Literal expressions</A></H3>

<P>
<A NAME="IDX86"></A>


<P>
<A NAME="IDX87"></A>
<A NAME="IDX88"></A>
<A NAME="IDX89"></A>
<DL>
<DT><U>syntax:</U> <B>quote</B> <I>&#60;datum&#62;</I>
<DD>


<P>
<DT><U>syntax:</U> <B><TT>'</TT>&#60;datum&#62;</B>
<DD>


<P>
<DT><U>syntax:</U> <B>&#60;constant&#62;</B>
<DD>


<P>
<SAMP>`(quote &#60;datum&#62;)'</SAMP> evaluates to &#60;datum&#62;.
<A NAME="IDX90"></A>
&#60;Datum&#62;
may be any external representation of a Scheme object (see
section see section <A HREF="r5rs_5.html#SEC21">3.3 External representations</A>).  This notation is used to include literal
constants in Scheme code.



<PRE>
<TT>
(quote a)                              ==&#62;  a
(quote #(a b c))                       ==&#62;  #(a b c)
(quote (+ 1 2))                        ==&#62;  (+ 1 2)
</TT>
</PRE>

<P>
<SAMP>`(quote &#60;datum&#62;)'</SAMP> may be abbreviated as
<TT>'</TT>&#60;datum&#62;.  The two notations are equivalent in all
respects.



<PRE>
<TT>'a                                     ==&#62;  a
'#(a b c)                              ==&#62;  #(a b c)
'()                                    ==&#62;  ()
'(+ 1 2)                               ==&#62;  (+ 1 2)
'(quote a)                             ==&#62;  (quote a)
''a                                    ==&#62;  (quote a)
</TT>
</PRE>

<P>
Numerical constants, string constants, character constants, and boolean
constants evaluate "to themselves"; they need not be quoted.



<PRE>
<TT>'"abc"                                 ==&#62;  "abc"
"abc"                                  ==&#62;  "abc"
'145932                                ==&#62;  145932
145932                                 ==&#62;  145932
'#t                                    ==&#62;  #t
#t                                     ==&#62;  #t
</TT>
</PRE>

<P>
As noted in section <A HREF="r5rs_5.html#SEC22">3.4 Storage model</A>, it is an error to alter a constant
(i.e. the value of a literal expression) using a mutation procedure like
<SAMP>`set-car!'</SAMP> or <SAMP>`string-set!'</SAMP>.


</DL>



<H3><A NAME="SEC28" HREF="r5rs_toc.html#TOC28">4.1.3 Procedure calls</A></H3>

<P>
<A NAME="IDX91"></A>


<P>
<A NAME="IDX92"></A>
<DL>
<DT><U>syntax:</U> <B>(&#60;operator&#62;</B> <I>&#60;operand1&#62; ...)</I>
<DD>


<P>
A procedure call is written by simply enclosing in parentheses
expressions for the procedure to be called and the arguments to be
passed to it.  The operator and operand expressions are evaluated (in an
unspecified order) and the resulting procedure is passed the resulting
arguments.
<A NAME="IDX93"></A>
<A NAME="IDX94"></A>



<PRE>
<TT>
(+ 3 4)                                ==&#62;  7
((if #f + *) 3 4)                      ==&#62;  12
</TT>
</PRE>

<P>
A number of procedures are available as the values of variables in the
initial environment; for example, the addition and multiplication
procedures in the above examples are the values of the variables <SAMP>`+'</SAMP>
and <SAMP>`*'</SAMP>.  New procedures are created by evaluating lambda expressions
(see section see section <A HREF="r5rs_6.html#SEC29">4.1.4 Procedures</A>).


<P>
Procedure calls may return any number of values (see <CODE>values</CODE> in
<A NAME="IDX95"></A>
section see section <A HREF="r5rs_8.html#SEC64">6.4 Control features</A>).  With the exception of <SAMP>`values'</SAMP>
the procedures available in the initial environment return one
value or, for procedures such as <SAMP>`apply'</SAMP>, pass on the values returned
by a call to one of their arguments.


<P>
Procedure calls are also called <EM>combinations</EM>.


<P>
<A NAME="IDX96"></A>



<BLOCKQUOTE>
<P>
<EM>Note:</EM> In contrast to other dialects of Lisp, the order of
evaluation is unspecified, and the operator expression and the operand
expressions are always evaluated with the same evaluation rules.
</BLOCKQUOTE>


<BLOCKQUOTE>
<P>
<EM>Note:</EM>
Although the order of evaluation is otherwise unspecified, the effect of
any concurrent evaluation of the operator and operand expressions is
constrained to be consistent with some sequential order of evaluation.
The order of evaluation may be chosen differently for each procedure call.
</BLOCKQUOTE>


<BLOCKQUOTE>
<P>
<EM>Note:</EM> In many dialects of Lisp, the empty combination, <TT>()</TT>, is a legitimate expression.  In Scheme, combinations must have at
least one subexpression, so <TT>()</TT> is not a syntactically valid
expression.  


</BLOCKQUOTE>

</DL>



<H3><A NAME="SEC29" HREF="r5rs_toc.html#TOC29">4.1.4 Procedures</A></H3>

<P>
<A NAME="IDX97"></A>


<P>
<A NAME="IDX98"></A>
<DL>
<DT><U>syntax:</U> <B>lambda</B> <I>&#60;formals&#62; &#60;body&#62;</I>
<DD>


<P>
<EM>Syntax:</EM>
&#60;Formals&#62; should be a formal arguments list as described below,
and &#60;body&#62; should be a sequence of one or more expressions.


<P>
<EM>Semantics:</EM>
A lambda expression evaluates to a procedure.  The environment in
effect when the lambda expression was evaluated is remembered as part of the
procedure.  When the procedure is later called with some actual
arguments, the environment in which the lambda expression was evaluated will
be extended by binding the variables in the formal argument list to
fresh locations, the corresponding actual argument values will be stored
in those locations, and the expressions in the body of the lambda expression
will be evaluated sequentially in the extended environment.
The result(s) of the last expression in the body will be returned as
the result(s) of the procedure call.



<PRE>
<TT>(lambda (x) (+ x x))                   ==&#62;  <EM></TT>a procedure
((lambda (x) (+ x x)) 4)               ==&#62;  8

(define reverse-subtract
  (lambda (x y) (- y x)))
(reverse-subtract 7 10)                ==&#62;  3

(define add4
  (let ((x 4))
    (lambda (y) (+ x y))))
(add4 6)                               ==&#62;  10
</EM>
</PRE>

<P>
&#60;Formals&#62; should have one of the following forms:



<UL>

<LI>

<TT>(&#60;variable1&#62; ...)</TT>:
The procedure takes a fixed number of arguments; when the procedure is
called, the arguments will be stored in the bindings of the
corresponding variables.

<LI>

&#60;variable&#62;:
The procedure takes any number of arguments; when the procedure is
called, the sequence of actual arguments is converted into a newly
allocated list, and the list is stored in the binding of the
&#60;variable&#62;.

<LI>

<TT>(&#60;variable1&#62; ... &#60;variable_n&#62; <B>.</B>
&#60;variable_n+1&#62;)</TT>:
If a space-delimited period precedes the last variable, then
the procedure takes n or more arguments, where n is the
number of formal arguments before the period (there must
be at least one).
The value stored in the binding of the last variable will be a
newly allocated
list of the actual arguments left over after all the other actual
arguments have been matched up against the other formal arguments.

</UL>

<P>
It is an error for a &#60;variable&#62; to appear more than once in
&#60;formals&#62;.



<PRE>
<TT>((lambda x x) 3 4 5 6)                 ==&#62;  (3 4 5 6)
((lambda (x y . z) z)
 3 4 5 6)                              ==&#62;  (5 6)
</TT>
</PRE>

<P>
Each procedure created as the result of evaluating a lambda expression is
(conceptually) tagged
with a storage location, in order to make <CODE>eqv?</CODE> and
<A NAME="IDX99"></A>
<CODE>eq?</CODE> work on procedures (see section see section <A HREF="r5rs_8.html#SEC49">6.1 Equivalence predicates</A>).
<A NAME="IDX100"></A>


</DL>



<H3><A NAME="SEC30" HREF="r5rs_toc.html#TOC30">4.1.5 Conditionals</A></H3>

<P>
<A NAME="IDX101"></A>


<P>
<A NAME="IDX102"></A>
<A NAME="IDX103"></A>
<DL>
<DT><U>syntax:</U> <B>if</B> <I>&#60;test&#62; &#60;consequent&#62; &#60;alternate&#62;</I>
<DD>
<DT><U>syntax:</U> <B>if</B> <I>&#60;test&#62; &#60;consequent&#62;</I>
<DD>


<P>
<EM>Syntax:</EM>
&#60;Test&#62;, &#60;consequent&#62;, and &#60;alternate&#62; may be arbitrary
expressions.


<P>
<EM>Semantics:</EM>
An <SAMP>`if'</SAMP> expression is evaluated as follows: first,
&#60;test&#62; is evaluated.  If it yields a true value (see
<A NAME="IDX104"></A>
section see section <A HREF="r5rs_8.html#SEC58">6.3.1 Booleans</A>), then &#60;consequent&#62; is evaluated and
its value(s) is(are) returned.  Otherwise &#60;alternate&#62; is evaluated and its
value(s) is(are) returned.  If &#60;test&#62; yields a false value and no
&#60;alternate&#62; is specified, then the result of the expression is
unspecified.



<PRE>
<TT>(if (&#62; 3 2) 'yes 'no)                  ==&#62;  yes
(if (&#62; 2 3) 'yes 'no)                  ==&#62;  no
(if (&#62; 3 2)
    (- 3 2)
    (+ 3 2))                           ==&#62;  1
</TT>
</PRE>

</DL>



<H3><A NAME="SEC31" HREF="r5rs_toc.html#TOC31">4.1.6 Assignments</A></H3>

<P>
<A NAME="IDX105"></A>


<P>
<A NAME="IDX106"></A>
<DL>
<DT><U>syntax:</U> <B>set!</B> <I>&#60;variable&#62; &#60;expression&#62;</I>
<DD>


<P>
&#60;Expression&#62; is evaluated, and the resulting value is stored in
the location to which &#60;variable&#62; is bound.  &#60;Variable&#62; must
be bound either in some region enclosing the <SAMP>`set!'</SAMP> expression
<A NAME="IDX107"></A>
or at top level.  The result of the <SAMP>`set!'</SAMP> expression is
unspecified.



<PRE>
<TT>(define x 2)
(+ x 1)                                ==&#62;  3
(set! x 4)                             ==&#62;  <EM>unspecified</EM>
(+ x 1)                                ==&#62;  5
</TT>
</PRE>

</DL>



<H2><A NAME="SEC32" HREF="r5rs_toc.html#TOC32">4.2 Derived expression types</A></H2>

<P>
<A NAME="IDX108"></A>


<P>
The constructs in this section are hygienic, as discussed in
section <A HREF="r5rs_6.html#SEC39">4.3 Macros</A>.
For reference purposes, section <A HREF="r5rs_9.html#SEC80">7.3 Derived expression types</A> gives macro definitions
that will convert most of the constructs described in this section 
into the primitive constructs described in the previous section.




<H3><A NAME="SEC33" HREF="r5rs_toc.html#TOC33">4.2.1 Conditionals</A></H3>

<P>
<A NAME="IDX109"></A>


<P>
<A NAME="IDX110"></A>
<DL>
<DT><U>library syntax:</U> <B>cond</B> <I>&#60;clause1&#62; &#60;clause2&#62; ...</I>
<DD>


<P>
<EM>Syntax:</EM>
Each &#60;clause&#62; should be of the form



<PRE>
<TT>(&#60;test&#62; &#60;expression1&#62; ...)
</TT>
</PRE>

<P>
where &#60;test&#62; is any expression.  Alternatively, a &#60;clause&#62; may be
of the form



<PRE>
<TT>(&#60;test&#62; =&#62; &#60;expression&#62;)
</TT>
</PRE>

<P>
The last &#60;clause&#62; may be
an "else clause," which has the form



<PRE>
<TT>(else &#60;expression1&#62; &#60;expression2&#62; ...).
</TT>
</PRE>

<P>
<A NAME="IDX111"></A>


<P>
<A NAME="IDX112"></A>


<P>
<EM>Semantics:</EM>
A <SAMP>`cond'</SAMP> expression is evaluated by evaluating the &#60;test&#62;
expressions of successive &#60;clause&#62;s in order until one of them
evaluates to a true value (see
<A NAME="IDX113"></A>
section see section <A HREF="r5rs_8.html#SEC58">6.3.1 Booleans</A>).  When a &#60;test&#62; evaluates to a true
value, then the remaining &#60;expression&#62;s in its &#60;clause&#62; are
evaluated in order, and the result(s) of the last &#60;expression&#62; in the
&#60;clause&#62; is(are) returned as the result(s) of the entire <SAMP>`cond'</SAMP>
expression.  If the selected &#60;clause&#62; contains only the
&#60;test&#62; and no &#60;expression&#62;s, then the value of the
&#60;test&#62; is returned as the result.  If the selected &#60;clause&#62; uses the
<CODE>=&#62;</CODE> alternate form, then the &#60;expression&#62; is evaluated.
<A NAME="IDX114"></A>
Its value must be a procedure that accepts one argument; this procedure is then
called on the value of the &#60;test&#62; and the value(s) returned by this
procedure is(are) returned by the <SAMP>`cond'</SAMP> expression.
If all &#60;test&#62;s evaluate
to false values, and there is no else clause, then the result of
the conditional expression is unspecified; if there is an else
clause, then its &#60;expression&#62;s are evaluated, and the value(s) of
the last one is(are) returned.



<PRE>
<TT>(cond ((&#62; 3 2) 'greater)
      ((&#60; 3 2) 'less))                 ==&#62;  greater

(cond ((&#62; 3 3) 'greater)
      ((&#60; 3 3) 'less)
      (else 'equal))                   ==&#62;  equal

(cond ((assv 'b '((a 1) (b 2))) =&#62; cadr)
      (else #f))                       ==&#62;  2
</TT>
</PRE>

</DL>

<P>
<A NAME="IDX115"></A>
<DL>
<DT><U>library syntax:</U> <B>case</B> <I>&#60;key&#62; &#60;clause1&#62; &#60;clause2&#62; ...</I>
<DD>


<P>
<EM>Syntax:</EM>
&#60;Key&#62; may be any expression.  Each &#60;clause&#62; should have
the form



<PRE>
<TT>((&#60;datum1&#62; ...) &#60;expression1&#62; &#60;expression2&#62; ...),
</TT>
</PRE>

<P>
where each &#60;datum&#62; is an external representation of some object.
All the &#60;datum&#62;s must be distinct.
The last &#60;clause&#62; may be an "else clause," which has the form



<PRE>
<TT>(else &#60;expression1&#62; &#60;expression2&#62; ...).
</TT>
</PRE>

<P>
<A NAME="IDX116"></A>


<P>
<EM>Semantics:</EM>
A <SAMP>`case'</SAMP> expression is evaluated as follows.  &#60;Key&#62; is
evaluated and its result is compared against each &#60;datum&#62;.  If the
result of evaluating &#60;key&#62; is equivalent (in the sense of
<SAMP>`eqv?'</SAMP>; see section see section <A HREF="r5rs_8.html#SEC49">6.1 Equivalence predicates</A>) to a &#60;datum&#62;, then the
expressions in the corresponding &#60;clause&#62; are evaluated from left
to right and the result(s) of the last expression in the &#60;clause&#62; is(are)
returned as the result(s) of the <SAMP>`case'</SAMP> expression.  If the result of
evaluating &#60;key&#62; is different from every &#60;datum&#62;, then if
there is an else clause its expressions are evaluated and the
result(s) of the last is(are) the result(s) of the <SAMP>`case'</SAMP> expression;
otherwise the result of the <SAMP>`case'</SAMP> expression is unspecified.



<PRE>
<TT>(case (* 2 3)
  ((2 3 5 7) 'prime)
  ((1 4 6 8 9) 'composite))            ==&#62;  composite
(case (car '(c d))
  ((a) 'a)
  ((b) 'b))                            ==&#62;  <EM>unspecified</EM>
(case (car '(c d))
  ((a e i o u) 'vowel)
  ((w y) 'semivowel)
  (else 'consonant))                   ==&#62;  consonant
</TT>
</PRE>

</DL>

<P>
<A NAME="IDX117"></A>
<DL>
<DT><U>library syntax:</U> <B>and</B> <I>&#60;test1&#62; ...</I>
<DD>


<P>
The &#60;test&#62; expressions are evaluated from left to right, and the
value of the first expression that evaluates to a false value (see
section see section <A HREF="r5rs_8.html#SEC58">6.3.1 Booleans</A>) is returned.  Any remaining expressions
are not evaluated.  If all the expressions evaluate to true values, the
value of the last expression is returned.  If there are no expressions
then <TT>#t</TT> is returned.



<PRE>
<TT>(and (= 2 2) (&#62; 2 1))                  ==&#62;  #t
(and (= 2 2) (&#60; 2 1))                  ==&#62;  #f
(and 1 2 'c '(f g))                    ==&#62;  (f g)
(and)                                  ==&#62;  #t
</TT>
</PRE>

</DL>


<P>
<A NAME="IDX118"></A>
<DL>
<DT><U>library syntax:</U> <B>or</B> <I>&#60;test1&#62; ...</I>
<DD>


<P>
The &#60;test&#62; expressions are evaluated from left to right, and the value of the
first expression that evaluates to a true value (see
section see section <A HREF="r5rs_8.html#SEC58">6.3.1 Booleans</A>) is returned.  Any remaining expressions
are not evaluated.  If all expressions evaluate to false values, the
value of the last expression is returned.  If there are no
expressions then <TT>#f</TT> is returned.



<PRE>
<TT>(or (= 2 2) (&#62; 2 1))                   ==&#62;  #t
(or (= 2 2) (&#60; 2 1))                   ==&#62;  #t
(or #f #f #f)                          ==&#62;  #f
(or (memq 'b '(a b c)) 
    (/ 3 0))                           ==&#62;  (b c)
</TT>
</PRE>

</DL>



<H3><A NAME="SEC34" HREF="r5rs_toc.html#TOC34">4.2.2 Binding constructs</A></H3>

<P>
<A NAME="IDX119"></A>


<P>
The three binding constructs <SAMP>`let'</SAMP>, <SAMP>`let*'</SAMP>, and <SAMP>`letrec'</SAMP>
give Scheme a block structure, like Algol 60.  The syntax of the three
constructs is identical, but they differ in the regions they establish
<A NAME="IDX120"></A>
for their variable bindings.  In a <SAMP>`let'</SAMP> expression, the initial
values are computed before any of the variables become bound; in a
<SAMP>`let*'</SAMP> expression, the bindings and evaluations are performed
sequentially; while in a <SAMP>`letrec'</SAMP> expression, all the bindings are in
effect while their initial values are being computed, thus allowing
mutually recursive definitions.


<P>
<A NAME="IDX121"></A>
<DL>
<DT><U>library syntax:</U> <B>let</B> <I>&#60;bindings&#62; &#60;body&#62;</I>
<DD>


<P>
<EM>Syntax:</EM>
&#60;Bindings&#62; should have the form



<PRE>
<TT>((&#60;variable1&#62; &#60;init1&#62;) ...),
</TT>
</PRE>

<P>
where each &#60;init&#62; is an expression, and &#60;body&#62; should be a
sequence of one or more expressions.  It is
an error for a &#60;variable&#62; to appear more than once in the list of variables
being bound.


<P>
<EM>Semantics:</EM>
The &#60;init&#62;s are evaluated in the current environment (in some
unspecified order), the &#60;variable&#62;s are bound to fresh locations
holding the results, the &#60;body&#62; is evaluated in the extended
environment, and the value(s) of the last expression of &#60;body&#62;
is(are) returned.  Each binding of a &#60;variable&#62; has &#60;body&#62; as its
region.



<PRE>
<TT>(let ((x 2) (y 3))
  (* x y))                             ==&#62;  6

(let ((x 2) (y 3))
  (let ((x 7)
        (z (+ x y)))
    (* z x)))                          ==&#62;  35
</TT>
</PRE>

<P>
See also named <SAMP>`let'</SAMP>, section <A HREF="r5rs_6.html#SEC36">4.2.4 Iteration</A>.


</DL>

<P>
<A NAME="IDX122"></A>
<DL>
<DT><U>library syntax:</U> <B>let*</B> <I>&#60;bindings&#62; &#60;body&#62;</I>
<DD>


<P>
<EM>Syntax:</EM>
&#60;Bindings&#62; should have the form



<PRE>
<TT>((&#60;variable1&#62; &#60;init1&#62;) ...),
</TT>
</PRE>

<P>
and &#60;body&#62; should be a sequence of
one or more expressions.


<P>
<EM>Semantics:</EM>
<SAMP>`Let*'</SAMP> is similar to <SAMP>`let'</SAMP>, but the bindings are performed
sequentially from left to right, and the region of a binding indicated
by <SAMP>`(&#60;variable&#62; &#60;init&#62;)'</SAMP> is that part of the <SAMP>`let*'</SAMP>
expression to the right of the binding.  Thus the second binding is done
in an environment in which the first binding is visible, and so on.



<PRE>
<TT>(let ((x 2) (y 3))
  (let* ((x 7)
         (z (+ x y)))
    (* z x)))                          ==&#62;  70
</TT>
</PRE>

</DL>

<P>
<A NAME="IDX123"></A>
<DL>
<DT><U>library syntax:</U> <B>letrec</B> <I>&#60;bindings&#62; &#60;body&#62;</I>
<DD>


<P>
<EM>Syntax:</EM>
&#60;Bindings&#62; should have the form



<PRE>
<TT>((&#60;variable1&#62; &#60;init1&#62;) ...),
</TT>
</PRE>

<P>
and &#60;body&#62; should be a sequence of
one or more expressions. It is an error for a &#60;variable&#62; to appear more
than once in the list of variables being bound.


<P>
<EM>Semantics:</EM>
The &#60;variable&#62;s are bound to fresh locations holding undefined
values, the &#60;init&#62;s are evaluated in the resulting environment (in
some unspecified order), each &#60;variable&#62; is assigned to the result
of the corresponding &#60;init&#62;, the &#60;body&#62; is evaluated in the
resulting environment, and the value(s) of the last expression in
&#60;body&#62; is(are) returned.  Each binding of a &#60;variable&#62; has the
entire <SAMP>`letrec'</SAMP> expression as its region, making it possible to
define mutually recursive procedures.



<PRE>
<TT>

(letrec ((even?
          (lambda (n)
            (if (zero? n)
                #t
                (odd? (- n 1)))))
         (odd?
          (lambda (n)
            (if (zero? n)
                #f
                (even? (- n 1))))))
  (even? 88))   
                                       ==&#62;  #t
</TT>
</PRE>

<P>
One restriction on <SAMP>`letrec'</SAMP> is very important: it must be possible
to evaluate each &#60;init&#62; without assigning or referring to the value of any
&#60;variable&#62;.  If this restriction is violated, then it is an error.  The
restriction is necessary because Scheme passes arguments by value rather than by
name.  In the most common uses of <SAMP>`letrec'</SAMP>, all the &#60;init&#62;s are
lambda expressions and the restriction is satisfied automatically.


</DL>



<H3><A NAME="SEC35" HREF="r5rs_toc.html#TOC35">4.2.3 Sequencing</A></H3>

<P>
<A NAME="IDX124"></A>


<P>
<A NAME="IDX125"></A>
<DL>
<DT><U>library syntax:</U> <B>begin</B> <I>&#60;expression1&#62; &#60;expression2&#62; ...</I>
<DD>


<P>
The &#60;expression&#62;s are evaluated sequentially from left to right,
and the value(s) of the last &#60;expression&#62; is(are) returned.  This
expression type is used to sequence side effects such as input and
output.



<PRE>
<TT>(define x 0)

(begin (set! x 5)
       (+ x 1))                        ==&#62;  6

(begin (display "4 plus 1 equals ")
       (display (+ 4 1)))              ==&#62;  <EM>unspecified</EM>
          <EM>and prints</EM>  4 plus 1 equals 5
</TT>
</PRE>

</DL>



<H3><A NAME="SEC36" HREF="r5rs_toc.html#TOC36">4.2.4 Iteration</A></H3>

<P>
<A NAME="IDX126"></A>


<P>


<P>
<A NAME="IDX127"></A>
<A NAME="IDX130"></A>
<A NAME="IDX128"></A>
<DL>
<DT><U>library syntax:</U> <B>(do</B> <I>((&#60;variable1&#62; &#60;init1&#62; &#60;step1&#62;) ...) (&#60;test&#62; &#60;expression&#62; ...) &#60;command&#62; ...</I><B>)</B>
<DD>


<P>
<TT> </TT>



<P>
<SAMP>`Do'</SAMP> is an iteration construct.  It specifies a set of variables to
be bound, how they are to be initialized at the start, and how they are
to be updated on each iteration.  When a termination condition is met,
the loop exits after evaluating the &#60;expression&#62;s.


<P>
<SAMP>`Do'</SAMP> expressions are evaluated as follows:
The &#60;init&#62; expressions are evaluated (in some unspecified order),
the &#60;variable&#62;s are bound to fresh locations, the results of the
&#60;init&#62; expressions are stored in the bindings of the
&#60;variable&#62;s, and then the iteration phase begins.


<P>
Each iteration begins by evaluating &#60;test&#62;; if the result is
false (see section see section <A HREF="r5rs_8.html#SEC58">6.3.1 Booleans</A>), then the &#60;command&#62;
expressions are evaluated in order for effect, the &#60;step&#62;
expressions are evaluated in some unspecified order, the
&#60;variable&#62;s are bound to fresh locations, the results of the
&#60;step&#62;s are stored in the bindings of the
&#60;variable&#62;s, and the next iteration begins.


<P>
If &#60;test&#62; evaluates to a true value, then the
&#60;expression&#62;s are evaluated from left to right and the value(s) of
the last &#60;expression&#62; is(are) returned.  If no &#60;expression&#62;s
are present, then the value of the <SAMP>`do'</SAMP> expression is unspecified.


<P>
The region of the binding of a &#60;variable&#62;
<A NAME="IDX129"></A>
consists of the entire <SAMP>`do'</SAMP> expression except for the &#60;init&#62;s.
It is an error for a &#60;variable&#62; to appear more than once in the
list of <SAMP>`do'</SAMP> variables.


<P>
A &#60;step&#62; may be omitted, in which case the effect is the
same as if <SAMP>`(&#60;variable&#62; &#60;init&#62; &#60;variable&#62;)'</SAMP> had
been written instead of <SAMP>`(&#60;variable&#62; &#60;init&#62;)'</SAMP>.



<PRE>
<TT>(do ((vec (make-vector 5))
     (i 0 (+ i 1)))
    ((= i 5) vec)
  (vector-set! vec i i))               ==&#62;  #(0 1 2 3 4)

(let ((x '(1 3 5 7 9)))
  (do ((x x (cdr x))
       (sum 0 (+ sum (car x))))
      ((null? x) sum)))                ==&#62;  25
</TT>
</PRE>

<P>
<DT><U>library syntax:</U> <B>let</B> <I>&#60;variable&#62; &#60;bindings&#62; &#60;body&#62;</I>
<DD>


<P>
"Named <SAMP>`let'</SAMP>" is a variant on the syntax of <CODE>let</CODE> which provides
<A NAME="IDX131"></A>
a more general looping construct than <SAMP>`do'</SAMP> and may also be used to express
recursions.
It has the same syntax and semantics as ordinary <SAMP>`let'</SAMP>
except that &#60;variable&#62; is bound within &#60;body&#62; to a procedure
whose formal arguments are the bound variables and whose body is
&#60;body&#62;.  Thus the execution of &#60;body&#62; may be repeated by
invoking the procedure named by &#60;variable&#62;.



<PRE>
<TT>(let loop ((numbers '(3 -2 1 6 -5))
           (nonneg '())
           (neg '()))
  (cond ((null? numbers) (list nonneg neg))
        ((&#62;= (car numbers) 0)
         (loop (cdr numbers)
               (cons (car numbers) nonneg)
               neg))
        ((&#60; (car numbers) 0)
         (loop (cdr numbers)
               nonneg
               (cons (car numbers) neg)))))   
          ==&#62;  ((6 1 3) (-5 -2))
</TT>
</PRE>

</DL>



<H3><A NAME="SEC37" HREF="r5rs_toc.html#TOC37">4.2.5 Delayed evaluation</A></H3>

<P>
<A NAME="IDX132"></A>


<P>
<A NAME="IDX133"></A>
<DL>
<DT><U>library syntax:</U> <B>delay</B> <I>&#60;expression&#62;</I>
<DD>


<P>
The <SAMP>`delay'</SAMP> construct is used together with the procedure <CODE>force</CODE> to
<A NAME="IDX134"></A>
implement <EM>lazy evaluation</EM> or <EM>call by need</EM>.
<A NAME="IDX135"></A>
<A NAME="IDX136"></A>
<TT>(delay &#60;expression&#62;)</TT> returns an object called a
<EM>promise</EM> which at some point in the future may be asked (by
<A NAME="IDX137"></A>
the <SAMP>`force'</SAMP> procedure) 
 to evaluate
&#60;expression&#62;, and deliver the resulting value.
The effect of &#60;expression&#62; returning multiple values
is unspecified.


<P>
See the description of <SAMP>`force'</SAMP> (section see section <A HREF="r5rs_8.html#SEC64">6.4 Control features</A>) for a
more complete description of <SAMP>`delay'</SAMP>.


</DL>



<H3><A NAME="SEC38" HREF="r5rs_toc.html#TOC38">4.2.6 Quasiquotation</A></H3>

<P>
<A NAME="IDX138"></A>


<P>
<A NAME="IDX139"></A>
<A NAME="IDX140"></A>
<DL>
<DT><U>syntax:</U> <B>quasiquote</B> <I>&#60;qq template&#62;</I>
<DD>


<P>
<DT><U>syntax:</U> <B><TT>`</TT>&#60;qq template&#62;</B>
<DD>


<P>
"Backquote" or "quasiquote" expressions are useful
<A NAME="IDX141"></A>
for constructing a list or vector structure when most but not all of the
desired structure is known in advance.  If no
commas appear within the &#60;qq template&#62;, the result of
<A NAME="IDX142"></A>
evaluating
<TT>`</TT>&#60;qq template&#62; is equivalent to the result of evaluating
<TT>'</TT>&#60;qq template&#62;.  If a comma appears within the
<A NAME="IDX143"></A>
&#60;qq template&#62;, however, the expression following the comma is
evaluated ("unquoted") and its result is inserted into the structure
instead of the comma and the expression.  If a comma appears followed
immediately by an at-sign (@), then the following
<A NAME="IDX144"></A>
expression must evaluate to a list; the opening and closing parentheses
of the list are then "stripped away" and the elements of the list are
inserted in place of the comma at-sign expression sequence.  A comma
at-sign should only appear within a list or vector &#60;qq template&#62;.



<PRE>
<TT>`(list ,(+ 1 2) 4)                     ==&#62;  (list 3 4)
(let ((name 'a)) `(list ,name ',name))           
          ==&#62;  (list a (quote a))
`(a ,(+ 1 2) ,@(map abs '(4 -5 6)) b)           
          ==&#62;  (a 3 4 5 6 b)
`((<SAMP>`foo'</SAMP> ,(- 10 3)) ,@(cdr '(c)) . ,(car '(cons)))           
          ==&#62;  ((foo 7) . cons)
`#(10 5 ,(sqrt 4) ,@(map sqrt '(16 9)) 8)           
          ==&#62;  #(10 5 2 4 3 8)
</TT>
</PRE>

<P>
Quasiquote forms may be nested.  Substitutions are made only for
unquoted components appearing at the same nesting level
as the outermost backquote.  The nesting level increases by one inside
each successive quasiquotation, and decreases by one inside each
unquotation.



<PRE>
<TT>`(a `(b ,(+ 1 2) ,(foo ,(+ 1 3) d) e) f)           
          ==&#62;  (a `(b ,(+ 1 2) ,(foo 4 d) e) f)
(let ((name1 'x)
      (name2 'y))
  `(a `(b ,,name1 ,',name2 d) e))           
          ==&#62;  (a `(b ,x ,'y d) e)
</TT>
</PRE>

<P>
The two notations
 <TT>`</TT>&#60;qq template&#62; and <TT>(quasiquote &#60;qq template&#62;)</TT>
 are identical in all respects.
 <SAMP>`,&#60;expression&#62;'</SAMP> is identical to <SAMP>`(unquote &#60;expression&#62;)'</SAMP>,
 and
 <SAMP>`,@&#60;expression&#62;'</SAMP> is identical to <SAMP>`(unquote-splicing &#60;expression&#62;)'</SAMP>.
The external syntax generated by <CODE>write</CODE> for two-element lists whose
<A NAME="IDX145"></A>
car is one of these symbols may vary between implementations.


<P>
<A NAME="IDX146"></A>



<PRE>
<TT>(quasiquote (list (unquote (+ 1 2)) 4))           
          ==&#62;  (list 3 4)
'(quasiquote (list (unquote (+ 1 2)) 4))           
          ==&#62;  `(list ,(+ 1 2) 4)
     <EM></TT>i.e., (quasiquote (list (unquote (+ 1 2)) 4))
</EM>
</PRE>

<P>
Unpredictable behavior can result if any of the symbols
<CODE>quasiquote</CODE>, <CODE>unquote</CODE>, or <CODE>unquote-splicing</CODE> appear in
<A NAME="IDX147"></A>
<A NAME="IDX148"></A>
<A NAME="IDX149"></A>
positions within a &#60;qq template&#62; otherwise than as described above.


</DL>



<H2><A NAME="SEC39" HREF="r5rs_toc.html#TOC39">4.3 Macros</A></H2>

<P>
<A NAME="IDX150"></A>


<P>
Scheme programs can define and use new derived expression types,
 called <EM>macros</EM>.
<A NAME="IDX151"></A>
Program-defined expression types have the syntax



<PRE>

(&#60;keyword&#62; &#60;datum&#62; ...)

</PRE>

<P>
where &#60;keyword&#62; is an identifier that uniquely determines the
expression type.  This identifier is called the <EM>syntactic
keyword</EM>, or simply <EM>keyword</EM>, of the macro.  The
<A NAME="IDX152"></A>
<A NAME="IDX153"></A>
<A NAME="IDX154"></A>
number of the &#60;datum&#62;s, and their syntax, depends on the
expression type.


<P>
Each instance of a macro is called a <EM>use</EM>
<A NAME="IDX155"></A>
of the macro.
The set of rules that specifies
how a use of a macro is transcribed into a more primitive expression
is called the <EM>transformer</EM>
<A NAME="IDX156"></A>
of the macro.


<P>
The macro definition facility consists of two parts:



<UL>

<LI>

A set of expressions used to establish that certain identifiers
are macro keywords, associate them with macro transformers, and control
the scope within which a macro is defined, and

<LI>

a pattern language for specifying macro transformers.

</UL>

<P>
The syntactic keyword of a macro may shadow variable bindings, and local
variable bindings may shadow keyword bindings.    All macros
defined using the pattern language  are "hygienic" and "referentially
transparent" and thus preserve Scheme's lexical scoping <A HREF="r5rs_13.html#BIB14">[Kohlbecker86]</A>, [
hygienic], <A HREF="r5rs_13.html#BIB2">[Bawden88]</A>, <A HREF="r5rs_13.html#BIB7">[macrosthatwork]</A>, <A HREF="r5rs_13.html#BIB9">[syntacticabstraction]</A>:


<P>
<A NAME="IDX157"></A>


<P>
<A NAME="IDX158"></A>



<UL>

<LI>

If a macro transformer inserts a binding for an identifier
(variable or keyword), the identifier will in effect be renamed
throughout its scope to avoid conflicts with other identifiers.
Note that a <CODE>define</CODE> at top level may or may not introduce a binding;
see section <A HREF="r5rs_7.html#SEC44">5.2 Definitions</A>.

<LI>

If a macro transformer inserts a free reference to an
identifier, the reference refers to the binding that was visible
where the transformer was specified, regardless of any local
bindings that may surround the use of the macro.

</UL>

<P>
<A NAME="IDX159"></A>




<H3><A NAME="SEC40" HREF="r5rs_toc.html#TOC40">4.3.1 Binding constructs for syntactic keywords</A></H3>

<P>
<A NAME="IDX160"></A>


<P>
<SAMP>`Let-syntax'</SAMP> and <SAMP>`letrec-syntax'</SAMP> are
analogous to <SAMP>`let'</SAMP> and <SAMP>`letrec'</SAMP>, but they bind
syntactic keywords to macro transformers instead of binding variables
to locations that contain values.  Syntactic keywords may also be
bound at top level; see section <A HREF="r5rs_7.html#SEC47">5.3 Syntax definitions</A>.


<P>
<A NAME="IDX161"></A>
<DL>
<DT><U>syntax:</U> <B>let-syntax</B> <I>&#60;bindings&#62; &#60;body&#62;</I>
<DD>


<P>
<EM>Syntax:</EM>
&#60;Bindings&#62; should have the form



<PRE>
<TT>((&#60;keyword&#62; &#60;transformer spec&#62;) ...)
</TT>
</PRE>

<P>
Each &#60;keyword&#62; is an identifier,
each &#60;transformer spec&#62; is an instance of <SAMP>`syntax-rules'</SAMP>, and
&#60;body&#62; should be a sequence of one or more expressions.  It is an error
for a &#60;keyword&#62; to appear more than once in the list of keywords
being bound.


<P>
<EM>Semantics:</EM>
The &#60;body&#62; is expanded in the syntactic environment
obtained by extending the syntactic environment of the
<SAMP>`let-syntax'</SAMP> expression with macros whose keywords are
the &#60;keyword&#62;s, bound to the specified transformers.
Each binding of a &#60;keyword&#62; has &#60;body&#62; as its region.



<PRE>
<TT>(let-syntax ((when (syntax-rules ()
                     ((when test stmt1 stmt2 ...)
                      (if test
                          (begin stmt1
                                 stmt2 ...))))))
  (let ((if #t))
    (when if (set! if 'now))
    if))                               ==&#62;  now

(let ((x 'outer))
  (let-syntax ((m (syntax-rules () ((m) x))))
    (let ((x 'inner))
      (m))))                           ==&#62;  outer
</TT>
</PRE>

</DL>

<P>
<A NAME="IDX162"></A>
<DL>
<DT><U>syntax:</U> <B>letrec-syntax</B> <I>&#60;bindings&#62; &#60;body&#62;</I>
<DD>


<P>
<EM>Syntax:</EM>
Same as for <SAMP>`let-syntax'</SAMP>.


<P>
<EM>Semantics:</EM>
 The &#60;body&#62; is expanded in the syntactic environment obtained by
extending the syntactic environment of the <SAMP>`letrec-syntax'</SAMP>
expression with macros whose keywords are the
&#60;keyword&#62;s, bound to the specified transformers.
Each binding of a &#60;keyword&#62; has the &#60;bindings&#62;
as well as the &#60;body&#62; within its region,
so the transformers can
transcribe expressions into uses of the macros
introduced by the <SAMP>`letrec-syntax'</SAMP> expression.



<PRE>
<TT>(letrec-syntax
  ((my-or (syntax-rules ()
            ((my-or) #f)
            ((my-or e) e)
            ((my-or e1 e2 ...)
             (let ((temp e1))
               (if temp
                   temp
                   (my-or e2 ...)))))))
  (let ((x #f)
        (y 7)
        (temp 8)
        (let odd?)
        (if even?))
    (my-or x
           (let temp)
           (if y)
           y)))                        ==&#62;  7
</TT>
</PRE>

</DL>



<H3><A NAME="SEC41" HREF="r5rs_toc.html#TOC41">4.3.2 Pattern language</A></H3>

<P>
<A NAME="IDX163"></A>


<P>
A &#60;transformer spec&#62; has the following form:


<P>
<A NAME="IDX164"></A>
<DL>
<DT> <B>syntax-rules</B> <I>&#60;literals&#62; &#60;syntax rule&#62; ...</I>
<DD>


<P>
<EM>Syntax:</EM>
&#60;Literals&#62; is a list of identifiers and each &#60;syntax rule&#62;
should be of the form



<PRE>
<TT>(&#60;pattern&#62; &#60;template&#62;)
</TT>
</PRE>

<P>
The &#60;pattern&#62; in a &#60;syntax rule&#62; is a list &#60;pattern&#62;
that begins with the keyword for the macro.


<P>
A &#60;pattern&#62; is either an identifier, a constant, or one of the
following



<PRE>
<TT>(&#60;pattern&#62; ...)
(&#60;pattern&#62; &#60;pattern&#62; ... . &#60;pattern&#62;)
(&#60;pattern&#62; ... &#60;pattern&#62; &#60;ellipsis&#62;)
#(&#60;pattern&#62; ...)
#(&#60;pattern&#62; ... &#60;pattern&#62; &#60;ellipsis&#62;)
</TT>
</PRE>

<P>
and a template is either an identifier, a constant, or one of the following



<PRE>
<TT>(&#60;element&#62; ...)
(&#60;element&#62; &#60;element&#62; ... . &#60;template&#62;)
#(&#60;element&#62; ...)
</TT>
</PRE>

<P>
where an &#60;element&#62; is a &#60;template&#62; optionally
followed by an &#60;ellipsis&#62; and
an &#60;ellipsis&#62; is the identifier "<SAMP>`...'</SAMP>" (which cannot be used as
an identifier in either a template or a pattern).
<A NAME="IDX165"></A>


<P>
<EM>Semantics:</EM> An instance of <SAMP>`syntax-rules'</SAMP> produces a new macro
transformer by specifying a sequence of hygienic rewrite rules.  A use
of a macro whose keyword is associated with a transformer specified by
<SAMP>`syntax-rules'</SAMP> is matched against the patterns contained in the
&#60;syntax rule&#62;s, beginning with the leftmost &#60;syntax rule&#62;.
When a match is found, the macro use is transcribed hygienically
according to the template.


<P>
An identifier that appears in the pattern of a &#60;syntax rule&#62; is
a <EM>pattern variable</EM>, unless it is the keyword that begins the pattern,
is listed in &#60;literals&#62;, or is the identifier "<SAMP>`...'</SAMP>".
Pattern variables match arbitrary input elements and
are used to refer to elements of the input in the template.  It is an
error for the same pattern variable to appear more than once in a
&#60;pattern&#62;.


<P>
The keyword at the beginning of the pattern in a
&#60;syntax rule&#62; is not involved in the matching and
is not considered a pattern variable or literal identifier.



<BLOCKQUOTE>
<P>
<EM>Rationale:</EM>
The scope of the keyword is determined by the expression or syntax
definition that binds it to the associated macro transformer.
If the keyword were a pattern variable or literal
identifier, then
the template that follows the pattern would be within its scope
regardless of whether the keyword were bound by <SAMP>`let-syntax'</SAMP>
or by <SAMP>`letrec-syntax'</SAMP>.
</BLOCKQUOTE>

<P>
Identifiers that appear in &#60;literals&#62; are interpreted as literal
identifiers to be matched against corresponding subforms of the input.
A subform
in the input matches a literal identifier if and only if it is an
identifier
and either both its occurrence in the macro expression and its
occurrence in the macro definition have the same lexical binding, or
the two identifiers are equal and both have no lexical binding.


<P>
A subpattern followed by <SAMP>`...'</SAMP> can match zero or more elements of the
input.  It is an error for <SAMP>`...'</SAMP> to appear in &#60;literals&#62;.
Within a pattern the identifier <SAMP>`...'</SAMP> must follow the last element of
a nonempty sequence of subpatterns.


<P>
More formally, an input form F matches a pattern P if and only if:



<UL>

<LI>

P is a non-literal identifier; or

<LI>

P is a literal identifier and F is an identifier with the same
binding; or

<LI>

P is a list <SAMP>`(P_1 ... P_n)'</SAMP> and F is a
list of n
forms that match P_1 through P_n, respectively; or

<LI>

P is an improper list
<SAMP>`(P_1 P_2 ... P_n . P_n+1)'</SAMP>
and F is a list or
improper list of n or more forms that match P_1 through P_n,
respectively, and whose nth "cdr" matches P_n+1; or

<LI>

P is of the form
<SAMP>`(P_1 ... P_n P_n+1 &#60;ellipsis&#62;)'</SAMP>
where &#60;ellipsis&#62; is the identifier <SAMP>`...'</SAMP>
and F is
a proper list of at least n forms, the first n of which match
P_1 through P_n, respectively, and each remaining element of F
matches P_n+1; or

<LI>

P is a vector of the form <SAMP>`#(P_1 ... P_n)'</SAMP>
and F is a vector
of n forms that match P_1 through P_n; or

<LI>

P is of the form
<SAMP>`#(P_1 ... P_n P_n+1 &#60;ellipsis&#62;)'</SAMP>
where &#60;ellipsis&#62; is the identifier <SAMP>`...'</SAMP>
and F is a vector of n
or more forms the first n of which match
P_1 through P_n, respectively, and each remaining element of F
matches P_n+1; or

<LI>

P is a datum and F is equal to P in the sense of
the <SAMP>`equal?'</SAMP> procedure.

</UL>

<P>
It is an error to use a macro keyword, within the scope of its
binding, in an expression that does not match any of the patterns.


<P>
When a macro use is transcribed according to the template of the
matching &#60;syntax rule&#62;, pattern variables that occur in the
template are replaced by the subforms they match in the input.
Pattern variables that occur in subpatterns followed by one or more
instances of the identifier
<SAMP>`...'</SAMP> are allowed only in subtemplates that are
followed by as many instances of <SAMP>`...'</SAMP>.
They are replaced in the
output by all of the subforms they match in the input, distributed as
indicated.  It is an error if the output cannot be built up as
specified.


<P>
Identifiers that appear in the template but are not pattern variables
or the identifier
<SAMP>`...'</SAMP> are inserted into the output as literal identifiers.  If a
literal identifier is inserted as a free identifier then it refers to the
binding of that identifier within whose scope the instance of
<SAMP>`syntax-rules'</SAMP> appears.
If a literal identifier is inserted as a bound identifier then it is
in effect renamed to prevent inadvertent captures of free identifiers.


<P>
As an example, if <CODE>let</CODE> and <CODE>cond</CODE> are defined as in
<A NAME="IDX166"></A>
<A NAME="IDX167"></A>
section <A HREF="r5rs_9.html#SEC80">7.3 Derived expression types</A> then they are hygienic (as required) and
the following is not an error.



<PRE>
<TT>(let ((=&#62; #f))
  (cond (#t =&#62; 'ok)))                  ==&#62; ok
</TT>
</PRE>

<P>
The macro transformer for <SAMP>`cond'</SAMP> recognizes <SAMP>`=&#62;'</SAMP>
as a local variable, and hence an expression, and not as the
top-level identifier <SAMP>`=&#62;'</SAMP>, which the macro transformer treats
as a syntactic keyword.  Thus the example expands into



<PRE>
<TT>(let ((=&#62; #f))
  (if #t (begin =&#62; 'ok)))
</TT>
</PRE>

<P>
instead of



<PRE>
<TT>(let ((=&#62; #f))
  (let ((temp #t))
    (if temp ('ok temp))))
</TT>
</PRE>

<P>
which would result in an invalid procedure call.


</DL>

<P>
         


<P><HR><P>
Go to the <A HREF="r5rs_1.html">first</A>, <A HREF="r5rs_5.html">previous</A>, <A HREF="r5rs_7.html">next</A>, <A HREF="r5rs_14.html">last</A> section, <A HREF="r5rs_toc.html">table of contents</A>.

&nbsp; <p></p> &nbsp; <p></p> &nbsp; <p></p> &nbsp; <p></p> &nbsp; <p></p> &nbsp; <p></p> &nbsp; <p></p> &nbsp; <p></p> &nbsp; <p></p> &nbsp; <p></p> &nbsp; <p></p> &nbsp; <p></p> &nbsp; <p></p> &nbsp; <p></p> &nbsp; <p></p> &nbsp; <p></p> &nbsp; <p></p> &nbsp; <p></p> &nbsp; <p></p> &nbsp;

</BODY>
</HTML>
